﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#import "/spring.ftl" as spring/>
<#assign id=command.id/>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title>Operator</title>
</head>

<body>
    <form method="post" action="operator.studio">
        <@spring.bind "command.code"/>
        Code: &nbsp; <input type="text" name="code" maxlength="10" value="${spring.status.value!}"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <@spring.bind "command.role"/>
        Role: &nbsp;
        <select name="role">
            <#list roles as role>
            <#assign selected = false/>
            <#if role==spring.status.value>
                <#assign selected = true/>
            </#if>
            <option value="${role}" <#if selected>selected="selected"</#if>>${role}</option>
            </#list>
        </select><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <@spring.bind "command.name"/>
        Name: &nbsp; <input type="text" name="name" maxlength="60" value="${spring.status.value!}"/><br />
        <@spring.bind "command.loginName"/>
        Login name: &nbsp; <input type="text" name="loginName" maxlength="40" value="${spring.status.value!}"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <#if id lte 0>
        <@spring.bind "command.password"/>
        Password: &nbsp; <input type="password" name="password" maxlength="40"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <@spring.bind "command.confirmPassword"/>
        Confirm password: &nbsp; <input type="password" name="confirmPassword" maxlength="40"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        </#if>
        <@spring.bind "command.address"/>
        Address: &nbsp; <input type="text" name="address" maxlength="128" value="${spring.status.value!}"/><br />
        <@spring.bind "command.phone"/>
        Phone: &nbsp; <input type="text" name="phone" maxlength="40" value="${spring.status.value!}"/><br />
        <@spring.bind "command.dateOfBirth"/>
        Date of birth: &nbsp; <input type="text" name="dateOfBirth" maxlength="12" value="${spring.status.value!}"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <@spring.bind "command.dateOfMarriage"/>
        Date of marriage: &nbsp; <input type="text" name="dateOfMarriage" maxlength="12" value="${spring.status.value!}"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <input type="hidden" name="id" value="${id}"/>
        <#if id lte 0>
        <input type="hidden" name="action" value="0"/>
        <input type="submit" value="Save"/>
        <#else>
        <input type="hidden" name="action" value="1"/>
        <input type="submit" value="Update"/>
        </#if>
    </form>
</body>

</html>
